<?php
	require_once '../Tool/Common/PrepareInput.php';

    session_start();
    if (empty($_SESSION["userType"])) {
        $url="../Index.php";
		include_once '../Tool/Common/Redirect.php';
		exit();
    }
    
    $CentreLocation=$searchid =""; 

    $result['flagCentreLocation']=0;
    $result['flagSearchId']=0;

    if(isset($_REQUEST['CentreLocation'])) { 
        $CentreLocation=prepareInput($_REQUEST['CentreLocation']); 
    }
    if(isset($_REQUEST['searchid'])) { 
        $searchid=prepareInput($_REQUEST['searchid']); 
    }
    if(!empty($CentreLocation)&&preg_match("/^[0-9]*$/",$CentreLocation)){
        $result['flagCentreLocation']=1;
    }
    if(empty($CentreLocation)){
        $result['flagCentreLocation']=1; 
    }
    if(!empty($searchid)&&preg_match("/^[0-9A-Za-z-:() ]*$/",$searchid)){
		$result['flagSearchId']=1;
	}
    if(empty($searchid)){
        $result['flagSearchId']=1; 
    }

    echo json_encode($result);
?>